/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.shinyray.project.bpm;


import org.jbpm.env.Environment;
import org.jbpm.env.EnvironmentFactory;
import org.jbpm.stream.ResourceStreamSource;

/**
 *
 * @author Administrator
 */
public class BPMHelper {
    private static EnvironmentFactory environmentFactory = EnvironmentFactory.parse(new ResourceStreamSource(
        "environment.cfg.xml"
    ));
    /**
     * 获取环境对象
     * @return
     */
    public static Environment getEnvironment()
    {
        Environment environment = environmentFactory.openEnvironment();
        return environment;
    }

}
